package com.skywolf.chem.match.params.vo;

import com.skywolf.chem.match.params.param.ApplyUserInfoParam;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.math.BigDecimal;
import java.util.List;

/**
 * 订单确认
 *
 * @Author sj
 * Date on 2021/9/29  9:33
 * @Version 1.0
 */
@Data
public class OrderConfirmVO {

    @NotBlank(message = "订单token不能为空")
    @ApiModelProperty(value = "订单token")
    private String orderToken;

    private List<OrderApplyUserInfo> orderList;

    private List<ApplyUserInfoParam> infoList;

    @NotNull(message = "组别编号不能为空")
    @ApiModelProperty(value = "组别编号")
    private Long matchId;

    @NotNull(message = "组别编号不能为空")
    @ApiModelProperty(value = "组别编号", required = true)
    private Long matchGroupId;

    @ApiModelProperty(value = "团队名称")
    private String teamName;

    @NotBlank(message = "紧急联系人名称不能为空")
    @ApiModelProperty(value = "紧急联系人名称", required = true)
    private String emergencyContactName;

    @NotBlank(message = "紧急联系人电话号码不能为空")
    @Pattern(regexp = "^(13[0-9]|14[5|7]|15[0|1|2|3|4|5|6|7|8|9]|18[0|1|2|3|5|6|7|8|9])\\d{8}$", message = "紧急联系人电话号码格式错误")
    @ApiModelProperty(value = "紧急联系人电话号码", required = true)
    private String emergencyContactPhone;

    @ApiModelProperty(value = "订单备注")
    private String remark;

    @Data
    public static class OrderApplyUserInfo {

        @ApiModelProperty(value = "参赛人姓名")
        private String userName;

        @ApiModelProperty(value = "参赛人电话号码")
        private String phone;

        @ApiModelProperty(value = "参赛人性别")
        private Integer gender;

        @ApiModelProperty(value = "参赛人身份证号码")
        private String idCard;
    }
}
